//
//  FGYLangViewController.m
//  01 - shop
//
//  Created by ma c on 16/8/18.
//  Copyright (c) 2016年 beijing. All rights reserved.
//

#import "FGYLangViewController.h"
#import "FGYInputView.h"
#import "FGYThirdView.h"
#import "FGYPhoneRegisterViewController.h"

@interface FGYLangViewController ()

@property (strong, nonatomic) FGYInputView * inputView;
@property (strong, nonatomic) FGYThirdView * thirdView;


@end

@implementation FGYLangViewController

- (FGYInputView *)inputView{
    if (!_inputView) {
        _inputView = [[FGYInputView alloc]init];
    }
    return _inputView;
}

- (FGYThirdView *)thirdView{
    if (!_thirdView) {
        _thirdView = [[FGYThirdView alloc]init];
    }
    return _thirdView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.inputView];
    [self.view addSubview:self.thirdView];
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.inputView.backgroundColor = RGB(245,245,245);
    self.thirdView.backgroundColor = RGB(245,245,245);
    [self addMasInputView];
}

- (void)addMasInputView{
    __weak typeof(self) weakSelf = self;
    [self.inputView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(weakSelf.view);
        make.height.equalTo(@240);
    }];
    
    [self.thirdView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(weakSelf.inputView);
        make.top.equalTo(weakSelf.inputView.mas_bottom);
        make.bottom.equalTo(weakSelf.view.mas_bottom);
    }];
    
#warning 给block赋值
    self.inputView.blockWithDict = ^(NSDictionary * dict){
        
        
        FGYPhoneRegisterViewController * phoneRegistVC = [[FGYPhoneRegisterViewController alloc]init];
        phoneRegistVC.userDict = dict;
        [weakSelf.navigationController pushViewController:phoneRegistVC animated:YES];
    };
    
}


@end
